package com.zhang.demo.ui.adaper

import android.content.Context
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.zhang.demo.R
import com.zhang.demo.model.entity.FileEntity

/**
 * Created by zhangke on 2020/8/22 17:11
 * E-Mail Address：2426017569@qq.com
 */
class FileHolder(context: Context,parent:ViewGroup) : BaseViewHolder<FileEntity>(context,
    R.layout.file_item,parent) {
    private var fileName: TextView? = null
    private var fileSize: TextView? = null
    private var fileTime: TextView? = null
    override fun initViews() {
        super.initViews()
        fileName=  findViewById<View>(R.id.fileName) as TextView
        fileSize=  findViewById<View>(R.id.fileSize) as TextView
        fileTime=  findViewById<View>(R.id.fileTime) as TextView
    }
    override fun display(data: FileEntity) {
        fileName?.text = data.fn
        fileSize?.text = data.fs
        fileTime?.text = data.upt
    }

}